<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\User;
use common\models\Usergroup;
/* @var $this yii\web\View */
/* @var $model common\models\User */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="user-form">

    <?php $form = ActiveForm::begin(); ?>
	
	<?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'status')->dropDownList(User::allStatus(),
    		['prompt'=>'请选择状态']);
			?>
    <?= $form->field($model, 'groupid') ->dropDownList(Usergroup::find()
						->select(['grouptitle'])
						->orderBy('groupid')
						->indexBy('groupid')
						->column(),
    		   ['prompt'=>'请选择分组']);?> 
    <div class="form-group">
        <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
